/**
 * Goal of this class is to enable anonymous inner AbstractAction classes to have an icon
 *
 * @author remo.lemma@lu.unisi.ch & patrick.zulian@lu.unisi.ch
 */

package ch.unisi.inf.projects.java.uom.gui.commands;

import javax.swing.ImageIcon;

public abstract class IconedCommand extends Command {
		
	public IconedCommand (final String name, final String desc, final String iconFileName)
	{
		this.putValue(NAME, name);
		this.putValue(SHORT_DESCRIPTION, desc);
		if (iconFileName != null)
			this.putValue(SMALL_ICON, new ImageIcon(getClass().getResource(iconFileName)));
	}
	
}
